import website from "@/config/website";
import {SYSTEM_PREFIX} from "@/store/constant";

export const tableOption = {
    height: 'auto',
    calcHeight: 210,
    tip: false,
    searchShow: true,
    searchMenuSpan: 6,
    border: true,
    index: true,
    addBtn: false,
    viewBtn: true,
    selection: true,
    column: [
      {
        label: "所属租户",
        prop: "tenantId",
        type: "tree",
        dicUrl: SYSTEM_PREFIX + "/tenant/select",
        addDisplay: false,
        editDisplay: false,
        viewDisplay: website.tenantMode,
        span: 24,
        props: {
          label: "tenantName",
          value: "tenantId"
        },
        hide: !website.tenantMode,
        rules: [{
          required: true,
          message: "请输入所属租户",
          trigger: "click"
        }]
      },
  {
    label: "岗位类型",
    prop: "category",
    type: "select",
    dicUrl: SYSTEM_PREFIX + "/dict/dictionary?code=post_category",
    props: {
      label: "dictValue",
      value: "dictKey"
    },
    dataType: "number",
    slot: true,
    search: true,
    rules: [{
      required: true,
      message: "请选择岗位类型",
      trigger: "blur"
    }]
  },
  {
    label: "岗位编号",
    prop: "postCode",
    search: true,
    rules: [{
      required: true,
      message: "请输入岗位编号",
      trigger: "blur"
    }]
  },
  {
    label: "岗位名称",
    prop: "postName",
    search: true,
    rules: [{
      required: true,
      message: "请输入岗位名称",
      trigger: "blur"
    }]
  },
  {
    label: "岗位排序",
    prop: "sort",
    type: "number",
    rules: [{
      required: true,
      message: "请输入岗位排序",
      trigger: "blur"
    }]
  },
  {
    label: "岗位描述",
    prop: "remark",
    type: "textarea",
    span: 24,
    minRows: 6,
    hide: true,
  },
  ]
}
